package com.lesent.kafka.service;

import org.apache.kafka.clients.producer.RecordMetadata;

import java.util.concurrent.ExecutionException;

public interface IKafkaService {

    /**
     * 发送redis消息,采用自动分片
     * @param topic
     * @param key
     * @param t
     * @param <T>
     * @return
     */
    <T> RecordMetadata send(String topic,String key,T t) throws ExecutionException, InterruptedException;

}
